package com.zx.map.service.impl;

import com.zx.map.dao.SummaryInfoDao;
import com.zx.map.dao.model.SummaryInfo;
import com.zx.map.service.SummaryInfoService;
import com.zx.map.service.model.SummaryInfoModel;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 15-9-12
 * Time: 下午12:35
 * To change this template use File | Settings | File Templates.
 */
@Component("summaryInfoService")
public class SummaryInfoServiceImpl implements SummaryInfoService {
    @Autowired
    private SummaryInfoDao dao;

    @Override
    public SummaryInfoModel getMerchantTOUseSummary(String merchantId) {
        SummaryInfoModel summaryInfoModel = new SummaryInfoModel();
        SummaryInfo temp = dao.getMerchantTOUseSummary(merchantId);
        BeanUtils.copyProperties(temp, summaryInfoModel);
        return summaryInfoModel;
    }
}
